package com.wmx.main;

/**
 * @author:wmx 2025-03-11 11:46
 * 1、功能:
 * 2、参数{
 * <p>
 * <p>
 * }
 **/
public class entrance {
    public static void main(String[] args) throws InterruptedException {
        Thread thread =  new Thread(){
            private  int num = 0;
            private  boolean flag = true;
            @Override
            public void run() {
                while (num < 10){
                    try {
                        Thread.sleep(200);
                        num += 2;
                        System.out.println("采集的数据:"+num);

                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        thread.start();
        thread.join();
        System.out.println("程序结束");



    }
}
